﻿
Namespace Media

    ''' <summary>
    ''' 媒体文件播放辅助类
    ''' </summary>
    ''' <remarks></remarks>
    Public Class PlayerHelper
        Private Shared helper As PlayerHelper
        Private player As Media.MediaPlayer

        Shared Sub New()
            helper = New PlayerHelper
        End Sub

        Public Shared Function Instance() As PlayerHelper
            Return helper
        End Function

        ''' <summary>
        ''' 播放文件
        ''' </summary>
        ''' <param name="fileName"></param>
        ''' <remarks></remarks>
        Public Sub Play(ByVal fileName As String)
            player = New MediaPlayer()
            player.FileName = fileName
            player.play()
        End Sub
    End Class
End Namespace

